3.898 \(\int \frac{5+2 x}{4+5 x+x^2} \, dx\)

Optimal. Leaf size=9 \[ \log \left (x^2+5 x+4\right ) \]

[Out]

Log[4 + 5*x + x^2]

________________________________________________________________________________________

Rubi [A]  time = 0.0030123, antiderivative size = 9, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {628} \[ \log \left (x^2+5 x+4\right ) \]

Antiderivative was successfully verified.

[In]

Int[(5 + 2*x)/(4 + 5*x + x^2),x]

[Out]

Log[4 + 5*x + x^2]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{5+2 x}{4+5 x+x^2} \, dx &=\log \left (4+5 x+x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0022838, size = 9, normalized size = 1. \[ \log \left (x^2+5 x+4\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(5 + 2*x)/(4 + 5*x + x^2),x]

[Out]

Log[4 + 5*x + x^2]

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 10, normalized size = 1.1 \begin{align*} \ln \left ({x}^{2}+5\,x+4 \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5+2*x)/(x^2+5*x+4),x)

[Out]

ln(x^2+5*x+4)

________________________________________________________________________________________

Maxima [A]  time = 1.11543, size = 12, normalized size = 1.33 \begin{align*} \log \left (x^{2} + 5 \, x + 4\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5+2*x)/(x^2+5*x+4),x, algorithm="maxima")

[Out]

log(x^2 + 5*x + 4)

________________________________________________________________________________________

Fricas [A]  time = 1.55628, size = 27, normalized size = 3. \begin{align*} \log \left (x^{2} + 5 \, x + 4\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5+2*x)/(x^2+5*x+4),x, algorithm="fricas")

[Out]

log(x^2 + 5*x + 4)

________________________________________________________________________________________

Sympy [A]  time = 0.186435, size = 8, normalized size = 0.89 \begin{align*} \log{\left (x^{2} + 5 x + 4 \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5+2*x)/(x**2+5*x+4),x)

[Out]

log(x**2 + 5*x + 4)

________________________________________________________________________________________

Giac [A]  time = 1.27087, size = 15, normalized size = 1.67 \begin{align*} \log \left ({\left | x + 4 \right |}\right ) + \log \left ({\left | x + 1 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((5+2*x)/(x^2+5*x+4),x, algorithm="giac")

[Out]

log(abs(x + 4)) + log(abs(x + 1))